1. Field of the Invention
The present invention relates to an image sensing apparatus and a method for controlling the same.
2. Description of the Related Art
In most widely available digital cameras, a color conversion process is performed to make the colors reproduced by captured image data optimal for the user, by, for example, making the colors truer to the colors of the subject, more desirable, or the like. However, the colors of the subject differ greatly depending on the light source that illuminates the subject. Accordingly, applying a color conversion process that has been set such that the optimal color reproduction is obtained under a predetermined light source to image data captured under a different light source does not always result in optimal colors being obtained.
In order to address this, in digital cameras, white balance adjustment is performed as a pre-processing for the color conversion process. However, color information, such as R, G, B, that is output by the sensor of a digital camera does not always correspond to the tristimulus values perceived by humans. This is due to the fact that the spectral sensitivities of the R, G, B pixels of the digital camera do not match the color matching function. If the spectral sensitivities match the color matching function, with an appropriate white balance adjustment, optimal color reproduction can be obtained through a single optimal color conversion process, regardless of the light sources. In actuality, however, the spectral sensitivities do not match the color matching function, and therefore it is necessary to perform a different color reproduction depending on the light source so as to achieve a more accurate color conversion process.
In order to perform a different color reproduction depending on the light source, it is necessary to prepare a color profile such as a look-up table for the respective light sources. A known method for producing such a color profile is disclosed in Japanese Patent Laid-Open No. 2004-153684, in which a prepared chart containing a plurality of color patches is captured and a color profile is produced based on the data of the captured color patches.
In the conventional method for producing a color profile, the color patches must be captured accurately. If the color patches are not accurately captured, for example, problems as described below occur, degrading the accuracy of the produced color profile or making the production itself impossible.                A chart is captured obliquely, making the extraction of color patch data difficult.        The angle of view is not appropriately set when capturing, and the resultant is affected by light falloff at edges of the lens or aberration.        A significant amount of noise appears in the data due to underexposure.        Data of surrounding colors other than the patches is included in the patch data due to inaccurate focusing (out of focus).        The chart is not appropriately illuminated, and the influence of non-uniform lighting occurs.        When captured against backlight or the like, lens flare or ghosting occurs.        
Usually, a color profile is produced on a personal computer (PC), and it is rarely produced at the location where the chart is captured. Thus, the case often occurs that image capturing failure is not noticed while capturing the chart, but is noticed when producing the color profile. If such a case occurs, it is necessary to return to the capturing location to capture the chart again. Particularly when the subject and chart were captured outdoors, it is almost impossible to restore the same capturing environment at a later time. If the capturing of the chart has failed and is impossible, it becomes impossible to produce an optimal color profile for the captured image of the subject. Moreover, it is not easy for a user without experience in capturing charts to accurately capture a chart.